// 登录服务
define('loginService', ['angular','jquery'], function (angular,$) {
    var module = angular.module('servers');
    module.factory('loginService', ['$http','Urlconfig',function($http,Urlconfig) { 
        return {
	        logIn: function(username, password) {
	            return $http({
                    method  : 'POST',
                    url: 'http://'+Urlconfig.apiUrl+':8888/api/users/login',
                    data:$.param({
                        "account":username,
                        "password":password
                    }),
                    cache:true,
                    headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
                });
	        },
	 
	        logOut: function() {
	 
	        }
	    };
    }]);
});